ans = 0
# dfs四个参数代表当前天数、当前休息天数、是否休息、当前连续休息天数
def dfs(now, rest_days, rest, continue_rest):
    if rest == 1:
        rest_days += 1
        continue_rest += 1
        if continue_rest > 1:
            return
    else:
        continue_rest = 0
    if rest_days > 4:
        return

    if now > 13:
        if 1 <= rest_days <= 4:
            global ans
            ans += 1
        return

    dfs(now + 1, rest_days, 0, continue_rest)  # 今天不休息
    dfs(now + 1, rest_days, 1, continue_rest)  # 今天休息

dfs(1, 0, 0, 0)
print(ans)
